#!/usr/bin/env python
# -*- coding: UTF-8 -*-
'''
@Project ：图灵学习 
@File    ：5.带有参数的装饰器.py
@IDE     ：PyCharm 
@Author  ：ChenLiGao
@Date    ：2024-10-28 15:04
'''

def log(level):
    def wrapper(func_obj):
        def wrapper_inner(*args,  **kwargs):
            print(f"wrapper：{id(wrapper)}")
            print(f"wrapper_inner：{id(wrapper_inner)}")
            print(f"函数名称：{func_obj.__name__}，log_level：{level}")
            print(args, kwargs)
            return func_obj(*args, **kwargs)
        return wrapper_inner
    return wrapper

@log("info")
def pring_info(name, gender, address):
    print(f"姓名：{name}，性别：{gender}，地址：{address}")
    return  name, gender, address

print(f"pring_info：{id(pring_info)}")

name, gender, address = pring_info("安娜", "女", "长沙")
print(name, gender, address)